package com.xjh.basestudy.designmode.createMode.createMode2_Prototype.p1_orgin;

import com.xjh.basestudy.designmode.createMode.createMode2_Prototype.p1_orgin.EnemyPlane;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * @Author XuJianHua
 * @Date 2022/9/12 14:01
 * @Description 用循环的方式批量创建对象
 */
public class Client {
    public static void main(String[] args) {
        List<EnemyPlane> enemyPlanes = new ArrayList();
        for (int i = 0; i < 500; i++) {
            //此处于随机纵坐标处出现敌机
            EnemyPlane ep = new EnemyPlane(new Random().nextInt(200));
            enemyPlanes.add(ep);
        }

    }

}